<?php

namespace app\admin\validate;

use think\Validate;

class Content extends Validate
{
   
    protected $rule = [
        'title'       =>   'require|unique:archives',
        'cid'         =>   'require|number',
    ];
    
    protected $message = [
        'title.require'      =>'文档标题必须填写',
        'title.unique'       =>'文档标题已存在',
        'cid.require'        =>'上级栏目不能为空',
        'cid.number'         =>'上级栏目id必须为数字',
    ];
    protected $scene=[
		'save'=>['title','cid'],
		'edit'=>['title','cid'],
	];
}
